<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>父向子通讯</title>
</head>
<body>
<div id="app">

    <heima63 :student="student" :age="50"></heima63>

</div>


<script src="../node_modules/vue/dist/vue.js"></script>
<script>

    let heima63 = {
        props: {
            student: {
                type: Object, //类型
                default: {} //默认值
            },
            age: {
                type: Number,
                default: 18
            }
        },
        template: `
        <div>
            我是黑马63组件,{{student}}<br>
            age的展示为{{age}}
        </div>
        `,

    }


    let app = new Vue({
        el: "#app",
        components: {
            heima63
        },
        data: {
            student: {
                id: 10086,
                name: "ldh",
                age: 50
            }
        }

    });

</script>

</body>
</html>